package com.kuangstudy.io.properties;

import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

/**
 * ClassName: Demo2
 * date: 2021/07/16 16:01:40
 *
 * @author zlk
 */
public class Demo2 {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
        FileWriter writer = new FileWriter("e:\\2.txt");
        properties.setProperty("从来","12");
        properties.setProperty("kk2","11");
        properties.setProperty("kk3","13");
        properties.store(writer,"");//comments 注释一般为空字符串 不能为中文 有中文用FileWriter
        writer.close();
    }
}
